package com.luckmgr.system;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.common.utils.SpringUtil;
import com.luckmgr.core.ActivityCore;


/**
 * @author ltj 节点管理系统初始化类
 */
@Component
public class SystemMgr {
	private static Logger logger = Logger.getLogger(SystemMgr.class.getName());
	
	@Autowired
	ActivityCore activityCore;
	
	/**传输对象类型枚举*/
	//public enum CacheBeanTypeEnum{TRADEITEMMAP};
	
	/**
	 * 初始化的数据
	 */
	@PostConstruct
	public void init() {
		initDaemon();
	}

	/**
	 * 销毁系统级别的资源
	 */
	@PreDestroy
	public void destroy() {
		/*// 销毁ICE客户端
		nodeManageIntegration.destoryAllIceClient();
		// 销毁ICE服务器
		IceServerUtil.destory();*/
	}

	/**
	 * 初始化的守护线程
	 */
	private void initDaemon() {
		activityCore.start();
	}

}
